package thread;

public class ThreadFlag {

    public static void main(String[] args) {
        Thread thread = new Thread(() -> {
            for (int i = 0; i < 10; i++) {
                System.out.println(Thread.currentThread().isInterrupted());
            }
        });

        thread.start();
        //通知中断 此时对应第二钟情况 没有因为调用 wait/join/sleep 等方法而阻塞挂起
        thread.interrupt();
    }
}
